home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / MPW Interfaces & Libraries / CIncludes / Unmangler.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-01-29  |  1.7 KB  |  55 lines  |  [TEXT/MPS ]

  1. /************************************************************
  2.  
  3. Created: Wednesday, July 16, 1991 at 2:05 PM
  4.     Unmangler.h
  5.     C Interface to the Macintosh Libraries
  6.  
  7.  
  8.         Copyright Apple Computer, Inc. 1988-1991
  9.         All rights reserved
  10.  
  11. ************************************************************/
  12.  
  13. #ifndef __UNMANGLER__
  14. #define __UNMANGLER__
  15.  
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19.  
  20. int unmangle(char *dst, char *src, int limit);
  21.     /*
  22.     This function unmangles C++ mangled symbols (i.e. a symbol with a type signature).  The
  23.   mangled C string is passed in “src” and the unmangled C string is returned in “dst”.  Up
  24.   to “limit” characters (not including terminating null) may be retured in “dst”.
  25.  
  26.   The function returns,
  27.  
  28.          -1 ==> error, probably because symbol was not mangled, but looked like it was
  29.             0 ==> symbol wasn't mangled; not copied either
  30.             1 ==> symbol was mangled; unmangled result fit in buffer
  31.             2 ==> symbol was mangled; unmangled result truncated to fit in buffer (null written)
  32.     */
  33.  
  34.  
  35. pascal int Unmangle(char *dst, char *src, int limit);
  36.     /*
  37.     This function unmangles C++ mangled symbols (i.e. a symbol with a type signature).  The
  38.     mangled Pascal string is passed in “src” and the unmangled Pascal string is returned in
  39.     “dst”.  Up to “limit” characters may be retured in “dst”.
  40.     
  41.     The function returns,
  42.     
  43.          -1 ==> error, probably because symbol was not mangled, but looked like it was
  44.             0 ==> symbol wasn't mangled; not copied either
  45.             1 ==> symbol was mangled; unmangled result fit in buffer
  46.             2 ==> symbol was mangled; unmangled result truncated to fit in buffer (null written)
  47.             
  48.     This function is identical to unmangle() above except that all the strings are Pascal
  49.     instead of C strings.
  50.     */
  51.  
  52. #ifdef __cplusplus
  53. }
  54. #endif
  55. #endif